package be.bonamis.umpire.ui.client.places;

import java.util.List;

import be.bonamis.projects.umpire.business.dto.QuizDTO;
import be.bonamis.projects.umpire.business.dto.UmpireDTO;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;

public class QuizPlace extends Place {

	private String name;
	private UmpireDTO umpire;
	private List<QuizDTO> quizs;
	
	public static class Tokenizer implements PlaceTokenizer<QuizPlace>{

		@Override
		public QuizPlace getPlace(String token) {			
			return new QuizPlace(token, null, null);
		}

		@Override
		public String getToken(QuizPlace place) {			
			return place.getName();
		}
		
	}

	public QuizPlace(String token, UmpireDTO dto, List<QuizDTO> quizs) {
		this.name = token;
		this.umpire = dto;
		this.quizs = quizs;
	}

	public String getName() {
		return name;
	}

	public UmpireDTO getUmpire() {
		return umpire;
	}

	public List<QuizDTO> getQuizs() {
		return quizs;
	}
	
}
